
def desc_friend(name,age ):
    print( f"我的名字是{name},今年{age}岁")
desc_friend("小王",34)
desc_friend(name = "张三",age = 23)
# 参数顺序不影响结果
desc_friend(age = 27,name = "李四")

# def desc_pet(name,kind = '小狗',age):
#     print( f"我的名字是{name},今年{age}岁,是一只{kind}")
# desc_pet('kily','猫',1)


def desc_pet(name, age, kind='小狗'):
    print(f"我的名字是{name},今年{age}岁,是一只{kind}")

desc_pet('kily', 1, '猫')  # 指定所有参数
# 或者使用默认值
desc_pet('旺财', 2)  # kind 使用默认值'小狗'


def make_shirt(sex = '',size= '',color= ''):
    print(f"This make_shirt is {sex} , {size},{color}")


make_shirt("MAN","XXL","YELLOW")
make_shirt("MAN","XXL")
make_shirt("MAN")
make_shirt()

def get_name (first_name, last_name,middile_naem = '' ):
    full_name = first_name + " " + middile_naem + " " + last_name
    if middile_naem :
        return full_name
    else :
        return first_name + last_name

s = get_name("王", "小", "二")
s1 = get_name("李", "四")
print(s)
print(s1)


